<template lang="html">
  <div>
    <div class="btn">
        <el-button type="primary" @click="back">返回上级</el-button>
    </div>
    <div class="box">
      <el-container>
          <el-aside width="200px">
            <el-menu
              default-active="2"
              @select="selectIdx"
              class="el-menu-vertical-demo">
              <el-menu-item index="2">
                <i class="el-icon-menu"></i>
                <span slot="title">基本信息</span>
              </el-menu-item>
              <el-menu-item index="3">
                <i class="el-icon-setting"></i>
                <span slot="title">估价问题</span>
              </el-menu-item>
              <el-menu-item index="4" v-if="isLuxuries == '是'">
                <i class="el-icon-setting"></i>
                <span slot="title">图片估价</span>
              </el-menu-item>
              <el-menu-item index="5">
                <i class="el-icon-setting"></i>
                <span slot="title">注意事项</span>
              </el-menu-item>
              <el-menu-item index="6" v-if="isLuxuries == '否'">
                <i class="el-icon-setting"></i>
                <span slot="title">本机检测</span>
              </el-menu-item>
              <el-menu-item index="7">
                <i class="el-icon-setting"></i>
                <span slot="title">收货信息</span>
              </el-menu-item>
              <el-menu-item index="8" v-if="isLuxuries == '否'">
                <i class="el-icon-setting"></i>
                <span slot="title">行情数据</span>
              </el-menu-item>
            </el-menu>
          </el-aside>
          <el-main>
              <InfoVue v-if="idx == 2" :item="$route.query.item"/>
              <QaVue v-if="idx == 3" />
              <imgEstimationVue v-if="idx == 4"/>
              <noticeVue v-if="idx == 5"/>
              <localDetectionVue v-if="idx == 6"/>
              <takeInfoVue v-if="idx == 7"/>
              <marketDataVue v-if="idx == 8"/>

          </el-main>
        </el-container>
    </div>
  </div>
</template>

<script>
  import InfoVue from '../basic/info/info.vue'
  import QaVue from '../basic/qa/qa.vue'
  import imgEstimationVue from '../basic/imgEstimation/imgEstimation.vue'
  import noticeVue from '../basic/notice/notice.vue'
  import localDetectionVue from '../basic/localDetection/localDetection.vue'
  import marketDataVue from '../basic/marketData/marketData.vue'
  import takeInfoVue from '../basic/takeInfo/takeInfo.vue'

  export default {
    components : {
      InfoVue,
      QaVue,
      imgEstimationVue,
      noticeVue,
      localDetectionVue,
      marketDataVue,
      takeInfoVue
    },
    data () {
        return {
          idx : '2',
          isLuxuries : ''
        }
    },
    mounted () {
      this.isLuxuries = JSON.parse(this.$route.query.isLuxuries);
    },
    methods : {
      selectIdx (index) {
       this.idx = index
      },
      back () {
        this.$router.push({
          name : 'productAdmin'
        })
      }
    }
  }
</script>

<style  scoped>
.btn {
  margin-top: 10px;
}
.box {
  height: 100%;
  width: 100%;
  background-color: #fff;
  margin-top: 20PX;
}
.r {
  height: 100%;
}
.el-container {
  height: 500px;
}
.el-menu {
  height: 100%;
  /* padding: 20px 0; */
}
</style>
